<html>
<head><meta charset="utf-8"><title>Compiletime regression of normalize_ty_after_erasing_regions · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html">Compiletime regression of normalize_ty_after_erasing_regions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186705887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Compiletime%20regression%20of%20normalize_ty_after_erasing_regions/near/186705887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html#186705887">(Jan 27 2020 at 17:38)</a>:</h4>
<p>During my work on <a href="https://github.com/rust-lang/rust/pull/68524" target="_blank" title="https://github.com/rust-lang/rust/pull/68524">Generator Resume Arguments</a> I noticed that the implementation causes a <a href="https://github.com/rust-lang/rust/pull/68524#issuecomment-578487162" target="_blank" title="https://github.com/rust-lang/rust/pull/68524#issuecomment-578487162">10% regression</a> of the await-call-tree benchmarks because the <code>normalize_ty_after_erasing_regions</code> query takes longer to evaluate. The same query caused a <a href="https://github.com/rust-lang/rust/issues/67982" target="_blank" title="https://github.com/rust-lang/rust/issues/67982">huge regression</a> when the <code>IntoFuture</code> lowering was implemented. In both cases the query is still evaluated the same number of times, it just seems to take significantly more time to run.</p>
<p>Does anyone have an idea about what could cause this or how to investigate this? I'm not very familiar with how that query works.</p>



<a name="186739554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Compiletime%20regression%20of%20normalize_ty_after_erasing_regions/near/186739554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html#186739554">(Jan 27 2020 at 23:59)</a>:</h4>
<p>I might have figured it out: <a href="https://github.com/rust-lang/rust/pull/68524/commits/9aed42f5df6905d5cf9f68321b869b0c58c50c3b" target="_blank" title="https://github.com/rust-lang/rust/pull/68524/commits/9aed42f5df6905d5cf9f68321b869b0c58c50c3b">https://github.com/rust-lang/rust/pull/68524/commits/9aed42f5df6905d5cf9f68321b869b0c58c50c3b</a></p>



<a name="186812355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Compiletime%20regression%20of%20normalize_ty_after_erasing_regions/near/186812355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html#186812355">(Jan 28 2020 at 18:34)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> Deduplicating the types inside the generator might help performance too, not sure why I didn't get around to doing that.</p>



<a name="186812491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Compiletime%20regression%20of%20normalize_ty_after_erasing_regions/near/186812491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html#186812491">(Jan 28 2020 at 18:35)</a>:</h4>
<p>You mean inside the witness type?</p>



<a name="186812600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Compiletime%20regression%20of%20normalize_ty_after_erasing_regions/near/186812600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Compiletime.20regression.20of.20normalize_ty_after_erasing_regions.html#186812600">(Jan 28 2020 at 18:36)</a>:</h4>
<p>Yeah</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>